import * as echarts from "echarts";

export const options = {
  tooltip: {
    trigger: "axis",
    axisPointer: {
      type: "cross",
    },
  },
  grid: {
    left: "1%",
    right: "5%",
    top: "5%",
    bottom: "2%",
    containLabel: true,
  },
  xAxis: {
    type: "category",
    boundaryGap: false,
    data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
  },
  yAxis: {
    type: "value",
  },
  series: [
    {
      smooth: true,
      name: "Union Ads",
      type: "line",
      data: [220, 182, 191, 234, 290, 330, 125],
      lineStyle: {
        color: "#3CB371",
      },
      itemStyle: {
        color: "#3CB371",
        borderColor: "#3CB371",
        borderWidth: 3,
      },
      areaStyle: {
        normal: {
          color: new echarts.graphic.LinearGradient(
            0,
            0,
            0,
            1,
            [
              {
                offset: 0,
                color: "rgba(60,179,113, 0.8)",
              },
              {
                offset: 1,
                color: "rgba(60,179,113, 0.2)",
              },
            ],
            false
          ),
          shadowColor: "rgba(0, 0, 0, 0.5)",
          shadowBlur: 8,
        },
      },
    },
    {
      name: "完成量",
      type: "line",
      showAllSymbol: true,
      smooth: true,
      lineStyle: {
        color: "#FF8C00",
      },
      itemStyle: {
        color: "#FF8C00",
        borderColor: "#FF8C00",
        borderWidth: 3,
      },
      areaStyle: {
        normal: {
          color: new echarts.graphic.LinearGradient(
            0,
            0,
            0,
            1,
            [
              {
                offset: 0,
                color: "rgba(255,140,0, 0.8)",
              },
              {
                offset: 1,
                color: "rgba(255,140,0, 0)",
              },
            ],
            false
          ),
          shadowColor: "rgba(233, 195, 116, 0.8)",
          shadowBlur: 20,
        },
      },
      data: [281.55, 398.35, 214.02, 179.55, 289.57, 356.14, 784],
    },
  ],
};
